<template>
  <section class="title-info-wrapper after-border">
    <div
      class="title-info"
      :style="{width: width || 'auto'}"
      @click="redirect"
    >{{title}}<slot name="title"></slot></div>
    <div class="desc">{{desc}}<slot name="desc"></slot></div>
  </section>
</template>

<script>
  export default {
    data () {
      return {}
    },
    props: {
      title: [String, Date, Number],
      desc: String,
      width: {
        type: String,
        default: ''
      }
    },
    methods: {
      redirect () {
        this.$emit('redirect')
      }
    },
    mounted () {
    }
  }
</script>

<style lang="scss">
.title-info-wrapper{
  display: inline-block;
  padding: 0 30px;
  text-align: center;
  .title-info{
    font-size: 13px;
    color: #333;
    padding-bottom: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .desc{
    font-size: 13px;
    color: #aaa;
  }
}
</style>
